#include "CGameSceneFactory.h"

namespace game
{
	IGameScene* CGameSceneFactory::startScreenSceneCreator(IGameSceneManager* gameSceneManager)
	{
		IGameScene* result = new CStartScreenScene(gameSceneManager);
		return result;
	}

	IGameScene* CGameSceneFactory::inGameSceneCreator(IGameSceneManager* gameSceneManager)
	{
		IGameScene* result = new CInGameScene(gameSceneManager);
		return result;
	}

	void registerSceneTypes(IGameSceneManager* gameSceneManager)
	{
		IGameSceneManager::delegateGameSceneCreator* startScreenSceneCreator = new IGameSceneManager::delegateGameSceneCreator;
		*startScreenSceneCreator += NewDelegate(&CGameSceneFactory::startScreenSceneCreator);
		gameSceneManager->registerGameSceneType("startscreenscene", startScreenSceneCreator);

		IGameSceneManager::delegateGameSceneCreator* inGameSceneCreator = new IGameSceneManager::delegateGameSceneCreator;
		*inGameSceneCreator += NewDelegate(&CGameSceneFactory::inGameSceneCreator);
		gameSceneManager->registerGameSceneType("ingamescene", inGameSceneCreator);
	}

}